package ru.amse.jsynchro.net.server;

import java.net.Socket;

import ru.amse.jsynchro.logging.ILogger;

public class SimpleServer extends Server {
    private String folder;
    private String userName;
    private String userPassword;
    private ILogger logger;
    
    private static int myThreadNumber = 0;
    public SimpleServer(ILogger logger, String folder, String userName,
            String userPassword, int port) {
        super(logger);
        this.folder = folder;
        this.userName = userName;
        this.userPassword = userPassword;
        this.port = port;
        this.logger = logger;
    }
    
    public void run() {
        logger.info("server working");
        listenToClient();
    }

    protected Thread getServerThread(Socket socket) {
        return new SimpleServerThread(socket, myThreadNumber, logger, 
                folder, userName, userPassword);
    }
    
    
}
